#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;

const int N  = 1e5 + 10;

int n;
int a[N];
bool st1[N], st2[N];
int ans;

int bsearch(int l, int r, int x)
{
    while (l < r)
    {
        int mid = l + r >> 1;
        if (a[mid] > x) r = mid;
        else l = mid + 1;
    }
    return l;
}

int main()
{
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);

    scanf("%d" ,&n);
    for (int i = 1; i <= n; i ++ )
    {
        scanf("%d", &a[i]);
    }

    ans = n;

    stable_sort(a + 1, a + n + 1);

    for (int i = 1; i <= n; i ++ )
    {
        if (!st1[i])
        {
            int j = bsearch(i, n, a[i]);
            while (st2[j] == 1)
            {
                j ++ ;
                if (j > n) break;
            }
            if (j > n) continue;
            st2[j] = 1;
            st1[i] = 1;
            ans -- ;
        }
    }

    printf("%d\n", ans);

    return 0;
}
